<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>芯佑电商_修改密码</title>
    <#include "/website/commonWebsite.html">
</head>
<body>

<!--==头部==-->
<div class="header">
    <#include "/website/header.html">
</div>

<!--==内容区域==-->
<div class="home_n">
    <div  class="home_nr">
        <!--==banner==-->
        <div class="medat-ba">会员中心</div>
        <!--==内容==-->
        <div class="medat-nr">
            <!--==左侧==-->
            <#include "/website/left.html">
            <!--==右侧==-->
            <div class="medat-nr-ri">
                <!--标题-->
                <div class="medat-nr-rib">修改密码</div>
                <!--修改邮箱-->
                <div class="memod-sr">
                    <!--<div class="memod-sr-b">
                        <h1>验证手机：</h1>
                        <p><input type="text" placeholder="请输入您的手机"></p>
                    </div>
                    <div class="memod-sr-b">
                        <h1>验证码：</h1>
                        <p class="width-c"><input type="text" placeholder="请输入验证码"></p>
                        <h4><button type="button">获取验证码</button></h4>
                    </div>-->
                    <div class="memod-sr-b">
                        <h1>原始密码：</h1>
                        <p><input type="password" placeholder="请输入您的原始密码" id="oldPass"></p>
                    </div>
                    <div class="memod-sr-b">
                        <h1>输入密码：</h1>
                        <p><input type="password" placeholder="请输入您的密码" id="newPass1"></p>
                    </div>
                    <div class="memod-sr-b">
                        <h1>再次输入：</h1>
                        <p><input type="password" placeholder="请再次输入您的密码" id="newPass2"></p>
                    </div>
                    <div class="memod-sr-n">
                        <span><button type="button" onclick="updatePassword()">保存</button></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--==版权==-->
<script type="text/javascript">
    function load_home() {
        document.getElementById("viewDiv").innerHTML = '';
    }
</script>
<object type="text/html" data="/website/copyright" width="100%" height="370px" style="margin-bottom: -5px;"></object>

<!--==返回头部==-->
<script type="text/javascript" src="/website/js/backtop.js"></script>

<!--==省市区==-->
<script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
<script src="/website/js/address/area.js"></script>
<script src="/website/js/address/select.js"></script>

</body>
<script>
    $(function(){
        //选中图标
        $(".medat-nr-lel").find("a").removeClass("hover");
        $(".medat-nr-lel").find("a").eq(1).addClass("hover");
    })
    //修改密码
    function updatePassword(){
        $.ajax({
            url:'/website/personalData/updatePassword',
            type:"POST",
            data:{
                oldPass:$("#oldPass").val(),
                newPass1:$("#newPass1").val(),
                newPass2:$("#newPass2").val()
            },
            dataType : 'JSON',
            success : function(resp) {
                if(resp.code==200){
                    layer.msg(resp.message);
                    loginout();
                }else{
                    layer.msg(resp.message);
                }
            },
            error: function (resp, arg) {
                layer.msg("未知错误!");
            }
        })
    }
</script>
</html>